<template>
    <div class="swiper-container filmswiper">
            <div class="swiper-wrapper">
                <slot></slot>
            </div>
            <!-- 如果需要分页器 -->
            <div class="swiper-pagination"></div>

          </div>
</template>

<script>

import Swiper from 'swiper'
import 'swiper/dist/css/swiper.css'

export default {
  props: ['perview', 'myclassname'],
  mounted () {
    new Swiper('.' + this.myclassname, {
      // direction: 'vertical'
      // loop:true,
      //     // 如果需要分页器
      // pagination: {
      //   el: '.swiper-pagination',
      // }
      slidesPerView: this.perview,
      spaceBetween: this.myclassname === 'actorswiper' ? 5 : 10,
      freeMode: true

    })
  }
}
</script>

<style lang="scss" scoped>
    .swiper-wrapper{
        img{
            width: 100%;
        }
    }
</style>
